<template>
  <div style="width: 100%;height: 350px; overflow:auto;">
    <el-table :data="list" style="width: 100%;padding-top: 0px;">
      <el-table-column label="车场">
        <template slot-scope="scope">
          {{scope.row.account_parkname}}
        </template>
      </el-table-column>
      <el-table-column label="未缴费用" align="right">
        <template slot-scope="scope">
          ¥{{scope.row.cost | toThousandslsFilter}}
        </template>
      </el-table-column>
    </el-table>
    <!--<el-pagination-->
    <!--background-->
    <!--layout="total,prev,pager,next"-->
    <!--:total="18"-->
    <!--:page-size="5"-->
    <!--@current-change="handleCurrentChange"-->
    <!--&gt;</el-pagination>-->

  </div>
</template>

<script>
  import ElTag from '../../../../../node_modules/element-ui/packages/tag/src/tag'
  import ElRow from 'element-ui/packages/row/src/row'
  import { getParkingOweAmount } from '../../../../api/transaction'

  export default {
    components: { ElRow, ElTag }, data() {
      return {
        list: []
      }
    },
    filters: {
      statusFilter(status) {
        const statusMap = {
          success: 'success',
          pending: 'danger'
        }
        return statusMap[status]
      }
    },
    created() {
      getParkingOweAmount().then(
        res => {
          for (let index = 0; index < res.length; index++) {
            if (res[index].account_parkname !== null) {
              this.list.push(res[index])
            }
          }
        }
      )
    },
    methods: {
      handleCurrentChange(val) {
      }
    }
  }
</script>
